<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------

/*return [
    '__pattern__' => [
        'name' => '\w+',
    ],
    '[hello]'     => [
        ':id'   => ['index/hello', ['method' => 'get'], ['id' => '\d+']],
        ':name' => ['index/hello', ['method' => 'post']],
    ],
];*/

use think\Route;

//接口路由
Route::group('',function (){
    //首页
    Route::get('home','api/banner/banner');//banner
    Route::get('information','api/information/information');//最新资讯
    Route::get('information_list','api/information/information_list');//资讯列表
    Route::get('information_content/:id','api/Information/information_content');//资讯详情
    Route::get('life','api/life/life');//游学体验
    Route::get('life_list','api/Life/life_list');//游学体验列表
    Route::get('life_content/:id','api/Life/life_content');//游学体验详情
    Route::get('teacher','api/teacher/teacher');//名师规划
    Route::get('course','api/course/course');//日语培训
    Route::get('experience','api/experience/experience');//留学生活
    Route::get('introduce','api/introduce/introduce');//留学介绍、优势
    Route::get('introduce_cost','api/introduce/introduce_cost');//留学费用
    Route::get('course_list','api/course/course_list');//日语培训详情
    Route::get('introduce_job','api/introduce/introduce_job');//日本就业
    Route::get('introduce_look','api/introduce/introduce_look');//全局展望
    Route::get('experience_list','api/experience/experience_list');//留学实况
    Route::get('experience_content/:id','api/Experience/experience_content');//留学实况详情
    Route::get('student','api/student/student');//优秀学员
    Route::get('teacher_list','api/teacher/teacher_list');//名师展望
    Route::get('teacher_lists','api/teacher/teacher_lists');//专业视界
    //我要报名
    Route::post('sign','api/sign/sign');//我要报名
    //联系我们
    Route::get('content','api/content/content');//联系我们
    //关于颐投
    Route::get('about','api/about/about');//颐投介绍
    Route::get('school','api/school/school');//留学通
});


//后端路由
Route::group('admin',function (){
    Route::rule('/','admin/Index/login','get|post');//后台登录
    Route::rule('login','admin/Index/login','get|post');//后台登录
    Route::rule('loginout','admin/home/loginout','post');//退出登录
    Route::rule('forget','admin/index/forget','get|post');//发送验证码
    Route::rule('setpass','admin/index/setpass','post');//忘记密码
    Route::rule('home','admin/Home/home','get');//后台首页
    //banner图管理
    Route::rule('bannerlist','admin/Banner/bannerlist','get');//banner图列表
    Route::rule('banner_add','admin/Banner/banner_add','get|post');//banner图添加
    Route::rule('banner_status','admin/Banner/banner_status','post');//banner状态控住
    Route::rule('banner_del','admin/Banner/banner_del','post');//banner图删除
    Route::rule('banner_edit/[:id]','admin/Banner/banner_edit','get|post');//banner图编辑
    //管理员管理
    Route::rule('adminlist','admin/Admin/adminlist','get');//管理员列表
    Route::rule('adminadd','admin/Admin/adminadd','get|post');//管理员添加
    Route::rule('admine_dit/[:id]','admin/Admin/admin_edit','get|post');//管理员编辑
    Route::rule('admine_pass/[:id]','admin/Admin/admin_pass','get|post');//管理员密码编辑
    Route::rule('admin_del','admin/Admin/admin_del','post');//管理员删除
    Route::rule('admin_status','admin/Admin/admin_status','post');//管理员状态控制（禁用和启用）
    //关于颐投
    Route::rule('about','admin/about/about','get|post');//颐投介绍
    //留学通
    Route::rule('school','admin/About/school','get');//留学通列表
    Route::rule('school_add','admin/About/school_add','get|post');//留学通添加
    Route::rule('school_edit/[:id]','admin/About/school_edit','get|post');//留学通编辑
    Route::rule('school_del','admin/About/school_del','post');//留学通删除
    Route::rule('school_status','admin/About/school_status','post');//留学通状态控制
    //联系我们
    Route::rule('content','admin/about/content','get');//联系我们
    Route::rule('content_add','admin/About/content_add','get|post');//联系我们添加
    Route::rule('content_edit/[:id]','admin/About/content_edit','get|post');//联系我们编辑
    Route::rule('content_del','admin/About/content_del','post');//联系我们删除
    Route::rule('content_status','admin/About/content_status','post');//联系我们状态控制
    //报名管理
    Route::rule('sign_list','admin/sign/sign_list','get');//报名列表
    Route::rule('sign_status','admin/sign/sign_status','post');//报名处理
    Route::rule('sign_del','admin/sign/sign_del','post');//报名删除
    //留学介绍
    Route::rule('introduce_list','admin/Introduce/introduce_list','get|post');
    //留学优势
    Route::rule('introduces_list','admin/Introduces/introduces_list','get');//优势列表
    Route::rule('introduces_add','admin/Introduces/introduces_add','get|post');//优势添加
    Route::rule('introduces_edit/[:id]','admin/Introduces/introduces_edit','get|post');//优势编辑
    Route::rule('introduces_del','admin/Introduces/introduces_del','post');//优势删除
    //留学费用
    Route::rule('introduce_cost','admin/Introduce/introduce_cost','get|post');
    //日语培训
    Route::rule('course_list','admin/course/course_list','get');//培训课程列表
    Route::rule('course_add','admin/course/course_add','get|post');//培训课程添加
    Route::rule('course_edit/[:id]','admin/course/course_edit','get|post');//培训课程编辑
    Route::rule('course_del','admin/course/course_del','post');//培训课程删除
    //日本就业
    Route::rule('introduce_job','admin/Introduce/introduce_job','get|post');
    //全局展望
    Route::rule('introduce_look','admin/Introduce/introduce_look','get|post');
    //留学生活
    Route::rule('experience','admin/Experience/experience','get');//留学实况
    Route::rule('experience_add','admin/Experience/experience_add','get|post');//留学实况添加
    Route::rule('experience_edit/[:id]','admin/Experience/experience_edit','get|post');//留学实况编辑
    Route::rule('experience_del','admin/Experience/experience_del','post');//留学实况删除
    //优秀学员
    Route::rule('student','admin/student/student','get');//优秀学员列表
    Route::rule('student_add','admin/Student/student_add','get|post');//优秀学员添加
    Route::rule('student_edit/[:id]','admin/Student/student_edit','get|post');//优秀学员编辑
    Route::rule('student_del','admin/Student/student_del','post');//优秀学员删除
    //游学体验
    Route::rule('life','admin/Life/life','get');//游学体验
    Route::rule('life_add','admin/Life/life_add','get|post');//游学体验添加
    Route::rule('life_edit/[:id]','admin/Life/life_edit','get|post');//游学体验编辑
    Route::rule('life_del','admin/Life/life_del','post');//游学体验删除
    Route::rule('lifes','admin/Life/lifes','get|post');//游学体验简介更新
    //名师规划
    Route::rule('teacher','admin/Teacher/teacher','get');//名师展望
    Route::rule('teacher_add','admin/Teacher/teacher_add','get|post');//名师添加
    Route::rule('teacher_edit/[:id]','admin/Teacher/teacher_edit','get|post');//名师编辑
    Route::rule('teacher_del','admin/Teacher/teacher_del','post');//名师删除
    Route::rule('teachers','admin/Teacher/teachers','get');//专业视界
    Route::rule('teachers_add','admin/Teacher/teachers_add','get|post');//专业视界添加
    Route::rule('teachers_edit/[:id]','admin/Teacher/teachers_edit','get|post');//专业视界编辑
    Route::rule('teachers_del','admin/Teacher/teachers_del','post');//专业视界删除
    //资讯列表
    Route::get('information','admin/Information/information');//资讯列表
    Route::rule('information_add','admin/Information/information_add','get|post');//资讯添加
    Route::rule('information_edit/[:id]','admin/Information/information_edit','get|post');//资讯编辑
    Route::post('information_del','admin/Information/information_del');//资讯删除
    //系统设置
    Route::rule('systemset','admin/System/systemset','get|post');
});

